<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        <html><head>
        <link rel="stylesheet" type="text/css" href="apidocs.css"/>
        <title>API docs for &ldquo;sympy.polynomials.base&rdquo;</title>
        </head>
        <body><h1 class="module">Module s.p.base</h1><span id="part">Part of <a href="sympy.polynomials.html">sympy.polynomials</a></span><div class="toplevel"><div><p>Module providing the class Polynomial and low-level functions</p>
</div></div><table class="children"><tr class="class"><td>Class</td><td><a href="sympy.polynomials.base.PolynomialException.html">PolynomialException</a></td><td><span class="undocumented">Undocumented</span></td></tr><tr class="class"><td>Class</td><td><a href="sympy.polynomials.base.Polynomial.html">Polynomial</a></td><td><div><p>Unified representation of all kinds of polynomials.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.polynomials.base.sympy2coefficients">sympy2coefficients</a></td><td><div><p>Return the tuple of coefficients and exponents.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.polynomials.base.coefficients2sympy">coefficients2sympy</a></td><td><div><p>Return the SymPy expression of given coefficients and exponents.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.polynomials.base.reverse">reverse</a></td><td><div><p>Return a tuple with reversed order</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.polynomials.base.term_cmp">term_cmp</a></td><td><div><p>Compares tuples occuring in the Polynomial's coeffs.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.polynomials.base.term_mult">term_mult</a></td><td><div><p>Multiplication of a tuple representing a term.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.polynomials.base.term_div">term_div</a></td><td><div><p>Division of a tuple representing a term.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.polynomials.base.term_is_mult">term_is_mult</a></td><td><div><p>Return True if a is a multiple of b.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.polynomials.base.term_lcm">term_lcm</a></td><td><div><p>Least common multiple of tuples representing terms.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.polynomials.base.merge_var">merge_var</a></td><td><div><p>Return a sorted list of the symbols in the arguments</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.polynomials.base.coeff_ring">coeff_ring</a></td><td><div><p>Determine the number type of some atom, or some list of atoms.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.polynomials.base.get_numbers">get_numbers</a></td><td><div><p>Extracts the non-symbolic part of an expression.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.polynomials.base.integer_divisors">integer_divisors</a></td><td><div><p>Returns a list of all positive integer divisors of n.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.polynomials.base.Polynomial2IntPoly">Polynomial2IntPoly</a></td><td><div><p>Converts an instance of Polynomial to one of IntPoly.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.polynomials.base.IntPoly2Polynomial">IntPoly2Polynomial</a></td><td><div><p>Converts an instance of IntPoly to one of Polynomial.</p>
</div></td></tr></table>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.polynomials.base.sympy2coefficients">sympy2coefficients(sympy_expr, var, order):</a></div>
            <div class="functionBody"><div><p>Return the tuple of coefficients and exponents.</p>
<h1 class="heading">Usage:</h1>
  <p>This functions computes the tuples of coefficients and exponents from 
  a given SymPy expression. This expression is assumed to be expanded 
  already. The arguments 'var' and 'order' define the occuring variables 
  and the monomial order to use, respectively.</p>
  <p>Normally, the user would never call this function himself, it is 
  rather used within the Polynomial class.</p>
<h1 class="heading">Examples:</h1>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>x, y = symbols(<span class="py-string">'xy'</span>)
<span class="py-prompt">&gt;&gt;&gt; </span>sympy2coefficients(2*x + 3, [x], <span class="py-string">'lex'</span>)
<span class="py-output">((2, 1), (3, 0))</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>sympy2coefficients(x**2*y + 4*y, [x, y], <span class="py-string">'lex'</span>)
<span class="py-output">((1, 2, 1), (4, 0, 1))</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>sympy2coefficients(x**2*y + 4*y, [y], <span class="py-string">'lex'</span>)
<span class="py-output">((4 + x**2, 1),)</span></pre>
  <p>Also see <a 
  href="sympy.polynomials.base.Polynomial.html">Polynomial</a>, <a 
  href="sympy.polynomials.base.sympy2coefficients.html">sympy2coefficients</a>.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.polynomials.base.coefficients2sympy">coefficients2sympy(coeffs, var):</a></div>
            <div class="functionBody"><div><p>Return the SymPy expression of given coefficients and exponents.</p>
<h1 class="heading">Usage:</h1>
  <p>This functions computes the original SymPy expression from the tuples 
  of coefficients and exponents. The argument 'var' defines the occuring 
  variables.</p>
  <p>Normally, the user would never call this function himself, it is 
  rather used within the Polynomial class.</p>
<h1 class="heading">Examples:</h1>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>x, y = symbols(<span class="py-string">'xy'</span>)
<span class="py-prompt">&gt;&gt;&gt; </span>coefficients2sympy(((2, 1), (3, 0)), [x])
<span class="py-output">3 + 2*x</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>coefficients2sympy(((1, 2, 1), (4, 0, 1)), [x, y])
<span class="py-output">4*y + y*x**2</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>coefficients2sympy(((1, 2, 1), (4, 0, 1)), [y, x])
<span class="py-output">4*x + x*y**2</span></pre>
  <p>Also see <a 
  href="sympy.polynomials.base.Polynomial.html">Polynomial</a>, <a 
  href="sympy.polynomials.base.sympy2coefficients.html">sympy2coefficients</a>.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.polynomials.base.reverse">reverse(t):</a></div>
            <div class="functionBody"><div><p>Return a tuple with reversed order</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.polynomials.base.term_cmp">term_cmp(a, b, order):</a></div>
            <div class="functionBody"><div><p>Compares tuples occuring in the Polynomial's coeffs.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.polynomials.base.term_mult">term_mult(a, b):</a></div>
            <div class="functionBody"><div><p>Multiplication of a tuple representing a term.</p>
<p>a and b are assumed to be tuples of some Polynomial's coeffs of same 
length.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.polynomials.base.term_div">term_div(a, b):</a></div>
            <div class="functionBody"><div><p>Division of a tuple representing a term.</p>
<p>a and b are assumed to be tuples of some Polynomial's coeffs of same 
length.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.polynomials.base.term_is_mult">term_is_mult(a, b):</a></div>
            <div class="functionBody"><div><p>Return True if a is a multiple of b.</p>
<p>a and b are assumed to be tuples some Polynomial's coeffs same 
length.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.polynomials.base.term_lcm">term_lcm(a, b):</a></div>
            <div class="functionBody"><div><p>Least common multiple of tuples representing terms.</p>
<p>a and b are assumed to be tuples some Polynomial's coeffs same length. 
The coefficient is set to 1.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.polynomials.base.merge_var">merge_var(*a):</a></div>
            <div class="functionBody"><div><p>Return a sorted list of the symbols in the arguments</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.polynomials.base.coeff_ring">coeff_ring(atom):</a></div>
            <div class="functionBody"><div><p>Determine the number type of some atom, or some list of atoms.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.polynomials.base.get_numbers">get_numbers(atom):</a></div>
            <div class="functionBody"><div><p>Extracts the non-symbolic part of an expression.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.polynomials.base.integer_divisors">integer_divisors(n):</a></div>
            <div class="functionBody"><div><p>Returns a list of all positive integer divisors of n.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.polynomials.base.Polynomial2IntPoly">Polynomial2IntPoly(f):</a></div>
            <div class="functionBody"><div><p>Converts an instance of Polynomial to one of IntPoly.</p>
<p>Nothing is checked.</p>
</div></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.polynomials.base.IntPoly2Polynomial">IntPoly2Polynomial(f, var, order):</a></div>
            <div class="functionBody"><div><p>Converts an instance of IntPoly to one of Polynomial.</p>
<p>Nothing is checked.</p>
</div></div>
            </div></body>
        